1. Field of the Invention.
The present invention relates to a highly-integrated micro-processor and, more particularly, to a device for saving and restoring register information temporarily stored in a general-purpose register of a central-processing unit.
2. Description of the related art.
Recently, an architecture of high-performance micro-processors and high-integration fabrication technology thereof have been developed significantly. In particular, the processing capacity of micro-processors has been greatly improved to enable of advanced micro-processors which can provide an information processing environment suitable for a multi-task operating system. Among those micro-processors of this type a micro-processor is known which has, in its chip, instructions for the efficient internal execution of a specific multi-task operating system which enables a single machine to perform a plurality of different information processing (i.e., tasks) in a parallel manner. In the field of special-purpose machines, a micro-processor for a machine (called a "PROLOG machine") which is strongly linked to a "PROLOG", which is a typical one of computer languages suitable for programs for an artificial intelligence, has been widely developed.
In any of the above machines, register contents (e.g., control information, instructions, data and the like are also called as "register information" in this specification) in a micro-processor are frequently changed. For example, assume that a given task is performed on a multi-task operation system and at the same time another task must be performed in a parallel manner. In this case, stored contents of an internal register are changed such that register contents of a current register are saved to a main memory and necessary information are stored at empty register addresses of the register. When performance of the task is finished, the original information saved to the main memory are returned to the register, thereby restoring the register contents. According to the multi-task operation system, process-switching must be performed in units of predetermined time intervals of several milliseconds. Therefore, saving/restoring of processor information concerning the process currently being performed must be frequently and rapidly repeated between the register and the main memory in units of the above time intervals.
In the PROLOG machine, if a so-called "back step" in which a system environment is returned to a state one step before the current state is generated while a unification operation is being performed on an inference program system, all the information concerning the environment up to a closest branch point (called as a "choice point") among a plurality of choice points passed so far must be restored in a register. For this purpose, a large amount of information are transferred between the main memory and the internal register.
In a microscopic view point, when instructions such as a "subroutine call" or "return" included in software programs are to be performed while a given task is being performed, current register contents must be rewritten. In this case, again, current information stored in the register are saved to the main memory, and information required for performing the above instructions are written in the register.
According to current micro-processors, a frequency of saving/restoring of the register contents is significantly increased. Therefore, if the conventional register save/restore technique is adopted, an operation speed of the micro-processor is reduced. The reason for this is as follows. That is, according to the conventional register save/restore technique, each time saving/restoring is to be performed, managements for controlling each section must be performed to execute data accessing in the internal register and the main memory and data transfer therebetween. Therefore, as a time required for managements is increased, a time of a stand-by state for information processing is increased.
Conventionally, in consideration of the above situation, an improved micro-processor has been developed so that a save/restore step of all the register contents in the micro-processor can be performed by only a single instruction. However, according to such a software improvement, although a time required for fetching the instruction in a central processing unit can be reduced, a time required for actually transferring data between the register and the main memory cannot be reduced at all.